package com.example.administrator.zkdemo;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable.Creator;
import android.os.RemoteException;

/**
 * Created with Android Studio.
 * 描述: ${DESCRIPTION}
 * Date: 2018/11/19
 * Time: 16:57
 *
 * @author 晏琦云
 * @version ${VERSION}
 */
public abstract interface ISmdtManager extends IInterface {
    public abstract void execSuCmd(String paramString)
            throws RemoteException;

    public abstract String getAndroidBoardType()
            throws RemoteException;

    public abstract String getCurrentNetType()
            throws RemoteException;

    public abstract String getFormattedKernelVersion()
            throws RemoteException;

    public abstract String getInternalStorageMemory()
            throws RemoteException;

    public abstract String getMCUVersion()
            throws RemoteException;

    public abstract String getRunningMemory()
            throws RemoteException;

    public abstract String[] getSerialPorts()
            throws RemoteException;

    public abstract String getUartPath(String paramString)
            throws RemoteException;

    public abstract ParcelFileDescriptor openSerialPort(String paramString)
            throws RemoteException;

    public abstract void reboot(String paramString)
            throws RemoteException;

    public abstract void setPowerOffOnAlarm(String paramString1, String paramString2)
            throws RemoteException;

    public abstract void setRotation(String paramString)
            throws RemoteException;

    public abstract int setUSBEnable(int paramInt)
            throws RemoteException;

    public abstract void setVolumeStates(int paramInt)
            throws RemoteException;

    public abstract void shutdown()
            throws RemoteException;

    public abstract String smdtGetSDcardPath()
            throws RemoteException;

    public abstract String smdtGetUSBPath(int paramInt)
            throws RemoteException;

    public abstract void smdtSetPowerOffOnAlarm(String paramString1, String paramString2, String paramString3)
            throws RemoteException;

    public abstract void smdtSilentInstall(String paramString)
            throws RemoteException;

    public static abstract class Stub extends Binder
            implements ISmdtManager {
        private static final String DESCRIPTOR = "android.app.smdt.ISmdtManager";
        static final int TRANSACTION_execSuCmd = 3;
        static final int TRANSACTION_getAndroidBoardType = 8;
        static final int TRANSACTION_getCurrentNetType = 6;
        static final int TRANSACTION_getFormattedKernelVersion = 15;
        static final int TRANSACTION_getInternalStorageMemory = 17;
        static final int TRANSACTION_getMCUVersion = 7;
        static final int TRANSACTION_getRunningMemory = 16;
        static final int TRANSACTION_getSerialPorts = 13;
        static final int TRANSACTION_getUartPath = 12;
        static final int TRANSACTION_openSerialPort = 14;
        static final int TRANSACTION_reboot = 2;
        static final int TRANSACTION_setPowerOffOnAlarm = 4;
        static final int TRANSACTION_setRotation = 19;
        static final int TRANSACTION_setUSBEnable = 20;
        static final int TRANSACTION_setVolumeStates = 18;
        static final int TRANSACTION_shutdown = 1;
        static final int TRANSACTION_smdtGetSDcardPath = 9;
        static final int TRANSACTION_smdtGetUSBPath = 10;
        static final int TRANSACTION_smdtSetPowerOffOnAlarm = 5;
        static final int TRANSACTION_smdtSilentInstall = 11;

        public Stub() {
            attachInterface(this, "android.app.smdt.ISmdtManager");
        }

        public static ISmdtManager asInterface(IBinder paramIBinder) {
            if (paramIBinder == null)
                return null;
            IInterface localIInterface = paramIBinder.queryLocalInterface("android.app.smdt.ISmdtManager");
            if ((localIInterface != null) && ((localIInterface instanceof ISmdtManager)))
                return (ISmdtManager) localIInterface;
            return new Proxy(paramIBinder);
        }

        public IBinder asBinder() {
            return this;
        }

        public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
                throws RemoteException {
            if (paramInt1 != 1598968902) {
                switch (paramInt1) {
                    default:
                        return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
                    case 20:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramInt1 = setUSBEnable(paramParcel1.readInt());
                        paramParcel2.writeNoException();
                        paramParcel2.writeInt(paramInt1);
                        return true;
                    case 19:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        setRotation(paramParcel1.readString());
                        paramParcel2.writeNoException();
                        return true;
                    case 18:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        setVolumeStates(paramParcel1.readInt());
                        paramParcel2.writeNoException();
                        return true;
                    case 17:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getInternalStorageMemory();
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 16:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getRunningMemory();
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 15:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getFormattedKernelVersion();
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 14:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = openSerialPort(paramParcel1.readString());
                        paramParcel2.writeNoException();
                        if (paramParcel1 != null) {
                            paramParcel2.writeInt(1);
                            paramParcel1.writeToParcel(paramParcel2, 1);
                            return true;
                        }
                        paramParcel2.writeInt(0);
                        return true;
                    case 13:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getSerialPorts();
                        paramParcel2.writeNoException();
                        paramParcel2.writeStringArray(paramParcel1);
                        return true;
                    case 12:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getUartPath(paramParcel1.readString());
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 11:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        smdtSilentInstall(paramParcel1.readString());
                        paramParcel2.writeNoException();
                        return true;
                    case 10:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = smdtGetUSBPath(paramParcel1.readInt());
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 9:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = smdtGetSDcardPath();
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 8:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getAndroidBoardType();
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 7:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getMCUVersion();
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 6:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        paramParcel1 = getCurrentNetType();
                        paramParcel2.writeNoException();
                        paramParcel2.writeString(paramParcel1);
                        return true;
                    case 5:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        smdtSetPowerOffOnAlarm(paramParcel1.readString(), paramParcel1.readString(), paramParcel1.readString());
                        paramParcel2.writeNoException();
                        return true;
                    case 4:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        setPowerOffOnAlarm(paramParcel1.readString(), paramParcel1.readString());
                        paramParcel2.writeNoException();
                        return true;
                    case 3:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        execSuCmd(paramParcel1.readString());
                        paramParcel2.writeNoException();
                        return true;
                    case 2:
                        paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                        reboot(paramParcel1.readString());
                        paramParcel2.writeNoException();
                        return true;
                    case 1:
                }
                paramParcel1.enforceInterface("android.app.smdt.ISmdtManager");
                shutdown();
                paramParcel2.writeNoException();
                return true;
            }
            paramParcel2.writeString("android.app.smdt.ISmdtManager");
            return true;
        }

        private static class Proxy
                implements ISmdtManager {
            private IBinder mRemote;

            Proxy(IBinder paramIBinder) {
                this.mRemote = paramIBinder;
            }

            public IBinder asBinder() {
                return this.mRemote;
            }

            public void execSuCmd(String paramString)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString);
                    this.mRemote.transact(3, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString;
            }

            public String getAndroidBoardType()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(8, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String getCurrentNetType()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(6, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String getFormattedKernelVersion()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(15, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String getInterfaceDescriptor() {
                return "android.app.smdt.ISmdtManager";
            }

            public String getInternalStorageMemory()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(17, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String getMCUVersion()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(7, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String getRunningMemory()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(16, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String[] getSerialPorts()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(13, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String[] arrayOfString = localParcel2.createStringArray();
                    return arrayOfString;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String getUartPath(String paramString)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString);
                    this.mRemote.transact(12, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    paramString = localParcel2.readString();
                    return paramString;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString;
            }

            public ParcelFileDescriptor openSerialPort(String paramString)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString);
                    this.mRemote.transact(14, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    if (localParcel2.readInt() != 0)
                        paramString = (ParcelFileDescriptor) ParcelFileDescriptor.CREATOR.createFromParcel(localParcel2);
                    else
                        paramString = null;
                    return paramString;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString;
            }

            public void reboot(String paramString)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString);
                    this.mRemote.transact(2, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString;
            }

            public void setPowerOffOnAlarm(String paramString1, String paramString2)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString1);
                    localParcel1.writeString(paramString2);
                    this.mRemote.transact(4, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString1;
            }

            public void setRotation(String paramString)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString);
                    this.mRemote.transact(19, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString;
            }

            public int setUSBEnable(int paramInt)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeInt(paramInt);
                    this.mRemote.transact(20, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    paramInt = localParcel2.readInt();
                    return paramInt;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public void setVolumeStates(int paramInt)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeInt(paramInt);
                    this.mRemote.transact(18, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public void shutdown()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(1, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String smdtGetSDcardPath()
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    this.mRemote.transact(9, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public String smdtGetUSBPath(int paramInt)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeInt(paramInt);
                    this.mRemote.transact(10, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    String str = localParcel2.readString();
                    return str;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw localObject;
            }

            public void smdtSetPowerOffOnAlarm(String paramString1, String paramString2, String paramString3)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString1);
                    localParcel1.writeString(paramString2);
                    localParcel1.writeString(paramString3);
                    this.mRemote.transact(5, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString1;
            }

            public void smdtSilentInstall(String paramString)
                    throws RemoteException {
                Parcel localParcel1 = Parcel.obtain();
                Parcel localParcel2 = Parcel.obtain();
                try {
                    localParcel1.writeInterfaceToken("android.app.smdt.ISmdtManager");
                    localParcel1.writeString(paramString);
                    this.mRemote.transact(11, localParcel1, localParcel2, 0);
                    localParcel2.readException();
                    return;
                } finally {
                    localParcel2.recycle();
                    localParcel1.recycle();
                }
                throw paramString;
            }
        }
    }
}
